{extend name="public/base" /}

{block name="title"}<title>课程订单列表</title>{/block}

{block name="pjax_container"}
<style>
    tr>th,
    td {
        text-align: center;
    }

    .btn-group-xs>.btn,
    .btn-xs {
        padding: 5px;
        margin: 0 5px;
    }
     
.content-header>.breadcrumb>li{
    color: #999;
}
.content-header>.breadcrumb>.active{
    color: #666;
}
.content-header{
    height: 51px;
 
}
.btn-primary{
      background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 5px 10px; 
}
.box-primary{
  border-top-color: #ecf0f5 !important;
  border-top-width: 16px;
  
}
.btn-primary:hover{
     background-color: #1890FF;
    color: #fff;
    border: none;
    opacity: .9;
    border-radius: 6px !important; 
}
.delete-one{
    background-color: ff4141 !important;
    margin-left: 15px;
    border-radius: 6px;
}
.sreachs{
       background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 7px 15px; 
}


</style>
<section class="content-header">
    <ol class="breadcrumb">
        <li>商城管理</li>
        <li class="active">课程订单列表</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-tools" style="margin:5px;">
                    <form id="form1" action="{:search_url(['mobile'])}" method="GET" pjax-search="">
                        <div class="input-group input-group-sm">
                            <div style="width: 247px;">
                                <input type="text" class="mobile" name="mobile" style="border: none; border-bottom: 1px solid #ccc;height:34px; margin:0 15px;" value="{:input('get.mobile')}" placeholder="请输入手机号" AUTOCOMPLETE="off" >
                                <div class="input-group-btn" style="display: inline-block;">
                                    <button type="submit" class="btn btn-default sreachs">
                                        <i class="fa fa-search"></i>查询
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="box-header with-border">
                    <div class="pull-left">
                        <!--{:authAction(CONTROLLER_NAME.'/index_del','delete_all')}-->
                        <a href="javascript:xls_explode();" target="_blank" class="btn btn-sm btn-primary"> 导出</a>
                    </div>
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover">
                        <tr>
                            <th>订单号</th>
                            <th>用户名</th>
                            <th>联系电话</th>
                            <th>课程名称</th>
                            <th>购买人数</th>
                            <th>开课时间</th>
                            <th>操作</th>
                        </tr>
                        {volist name="$list" id="v"}
                        <tr>
                            <td>{$v["order_number"]}</td>
                            <td>{$v["name"]}</td>
                            <td>{$v["mobile"]}</td>
                            <td>{$course_list[$v["course_id"]]['name']}</td>
                            <td>{$v["people_sum"]}</td>
                            <td>{:date('Y-m-d H:i', $course_list[$v["course_id"]]['course_time'])}</td>
                            <td>
                                {:authAction(CONTROLLER_NAME.'/course_edit','show',['id'=>$v['id']])}
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</section>
<script>
    function xls_explode() {
        window.location.href = "{:url('Order/course')}?" + $('#form1').serialize()+'&export=1';
        return false;
    }
</script>
{/block}
